package com.guyan.form;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * ClassName： ProductUpdateForm
 * Date： 2021/6/12 20:11
 *
 * @author 孤焰
 * @version 1.0
 **/

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ProductUpdateForm {
    @NotNull(message = "Id不能为null")
    private Integer id;
    @NotNull(message = "分类Id不能为null")
    private Integer categoryId;
    @NotEmpty(message = "商品名称不能为空")
    private String name;
    @NotEmpty(message = "商品副标题不能为空")
    private String subtitle;
    @NotEmpty(message = "商品主图不能为空")
    private String mainImage;
    @NotEmpty(message = "商品详情图不能为空")
    private String subImages;
    @NotEmpty(message = "商品详情不能为空")
    private String detail;
    @NotNull(message = "商品价格不能为null")
    private BigDecimal price;
    @NotNull(message = "商品库存不能为null")
    private Long stock;
    @NotNull(message = "商品状态不能为null")
    private Integer status;
}
